Skip to main content

How to Evaluate a RAG System

Guide · about 8 min · refs checked 2026-11-03 (reference links and dates only)

A RAG failure can come from retrieval or from generation. Evaluate them separately, or you will fix the wrong part.

How to
Build an eval set first: real questions with gold answers; a few dozen is enough to start. Retrieval side, measure recall: did the chunk that should be found make it into the candidates? Generation side, measure faithfulness: can every sentence in the answer be supported by the retrieved chunks? Measure answer relevance separately: on-topic answers with wrong grounding are still a problem. Automate with a framework like RAGAS, then spot-check by hand to calibrate its scoring. Break scores down by scenario: average scores hide the weak spots of specific question types.

Example and interpretation

A teaching scenario, not a measured or executed site test.

If the right reimbursement policy was retrieved but the answer uses a meal allowance, inspect generation/evidence use. If every retrieved document is outdated, inspect retrieval first. Record the two failure types separately.

How to check your practice

Explain the example in your own words, inspect input constraints, then verify against the source. Revisit concepts if you cannot explain why; supply missing dates, fields or permissions; withdraw unsupported conclusions.

For this topic, start with unchecked output · See all six scenarios and their reasoning

Sources
  • Ragas: Automated Evaluation of Retrieval Augmented Generation (arXiv 2309.15217) ↗
  • RAGAS official documentation ↗
  • BEIR: A Heterogenous Benchmark for Zero-shot Evaluation of Information Retrieval Models (arXiv 2104.08663) ↗